Re: [HACKERS] Trouble in paradise: cancel via postmaster ain't so cool - Mailing list pgsql-hackers

From Henry B. Hotz
Subject Re: [HACKERS] Trouble in paradise: cancel via postmaster ain't so cool
Date
Msg-id v03130313b1c86614c6b4@[137.78.218.94]
Whole thread Raw
In response to Trouble in paradise: cancel via postmaster ain't so cool  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [HACKERS] Trouble in paradise: cancel via postmaster ain't so cool
List pgsql-hackers
At 3:46 PM -0700 7/7/98, Tom Lane wrote:
>I can see several alternatives, none very attractive:
>
>1. Try to code the new PQrequestCancel so that it doesn't invoke
>any likely-non-reentrant part of the C library.  Difficult at best,
>maybe impossible (is gethostbyname reentrant?  I doubt it if malloc
>isn't).
...

>I will work on #1 but I am not very hopeful of success.  Has anyone
>got a better idea?

Idea A:  precompute everything you need to do a cancel as part of sending
the request in the first place so #1 above takes minimum effort (i.e. no
malloc(), no gethostbyname(), no nothing).

Idea B:  spawn (vfork()/exec()) a cancel process so all the funny stuff
happens in a different address space.

Idea C:  look at what some standard network clients do to handle similar
problems.  What does ftp do for example?  It also seems like some network
programming textbooks, like Stevens, should discuss this problem.

Signature failed Preliminary Design Review.
Feasibility of a new signature is currently being evaluated.
h.b.hotz@jpl.nasa.gov, or hbhotz@oxy.edu



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] Re: [BUGS] Small bug in union
Next
From: "Thomas G. Lockhart"
Date:
Subject: Re: [HACKERS] Re: [BUGS] Small bug in union